package com.zmn.oms.common.utils;

import com.google.common.base.Strings;
import org.apache.commons.lang3.StringUtils;

/**
 * 类描述: 脱敏工具
 *
 * @author liuying
 * @date 2021/07/19 下午5:22
 */
public class DesensitizeUtil {

    public static String desensitizedAddress(String address) {
        if (!Strings.isNullOrEmpty(address)) {
            return String.join("****", StringUtils.left(address, 1), StringUtils.right(address, 1));
        }
        return address;
    }
}
